CC = g++
LD = g++
prog = libmusic.so
SRC = \
	data_miner.cpp \
	data_miner.h \
	file_streamer.cpp \
	file_streamer.h \
	music_system.cpp \
	music_system.h \
	title_adapter.cpp \
	title_adapter.h \
	title_dataset.cpp \
	title_dataset.h 
OBJ = \
	data_miner.o \
	file_streamer.o \
	music_system.o \
	title_adapter.o \
	title_dataset.o 

LDFLAGS = -shared -L../model -lmodel -lboost_thread -lboost_regex 
CFLAGS = -std=c99 -g -fPIC -DPIC -fvar-tracking  

all: $(prog)

${prog}: $(OBJ)
	$(LD) $(LDFLAGS) $(OBJ) -o $(prog)

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm $(OBJ)
	rm $(prog)

run:
	./$(prog)
